package comc.config;

import comc.pojo.User;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyBeanConfig {

    @Bean
    @ConditionalOnProperty(prefix = "config.person",name = "enable")//默认生效，为true生效
    public User person1(){
        return new User(1,"2","3","4",66);
    }
}
